xen: introduce mark_page_free
authorPenny Zheng <penny.zheng@arm.com>
Fri, 10 Sep 2021 02:52:11 +0000 (02:52 +0000)
committerStefano Stabellini <stefano.stabellini@xilinx.com>
Mon, 13 Sep 2021 21:10:17 +0000 (14:10 -0700)
commit540a637c3410780b519fc055f432afe271f642f8
treef536177a5459261686093434da04b5910cd85f9d
parent41c031ff437b66cfac4b120bd7698ca039850690
xen: introduce mark_page_free

This commit defines a new helper mark_page_free to extract common code,
like following the same cache/TLB coherency policy, between free_heap_pages
and the new function free_staticmem_pages, which will be introduced later.

The PDX compression makes that conversion between the MFN and the page can
be potentially non-trivial. As the function is internal, pass the MFN and
the page. They are both expected to match.

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Julien Grall <jgrall@amazon.com>
xen/common/page_alloc.c